<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>网页元素采集器</title>
    <style>
        body {
            width: 600px;
            padding: 20px;
            font-family: Arial, sans-serif;
            background-color: #f5f5f5;
        }

        h1 {
            color: #333;
            font-size: 20px;
            margin-bottom: 20px;
            text-align: center;
        }

        .button-group {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-bottom: 20px;
        }

        button {
            padding: 8px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        #collect {
            background-color: #4CAF50;
            color: white;
        }

        #collect:hover {
            background-color: #45a049;
        }

        #download {
            background-color: #2196F3;
            color: white;
        }

        #download:hover {
            background-color: #1e88e5;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin: 10px 0;
            background-color: white;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            border-radius: 4px;
        }

        th, td {
            border: 1px solid #ddd;
            padding: 12px 8px;
            text-align: left;
            font-size: 13px;
        }

        th {
            background-color: #f8f9fa;
            color: #333;
            font-weight: 600;
        }

        tr:hover {
            background-color: #f5f5f5;
        }

        td {
            color: #666;
        }

        #result {
            max-height: 400px;
            overflow-y: auto;
            border-radius: 4px;
        }

        /* 自定义滚动条 */
        #result::-webkit-scrollbar {
            width: 8px;
        }

        #result::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }

        #result::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 4px;
        }

        #result::-webkit-scrollbar-thumb:hover {
            background: #555;
        }
    </style>
</head>
<body>
    <h1>网页元素采集器</h1>
    <div class="button-group">
        <button id="collect">采集元素</button>
        <button id="download">下载数据</button>
    </div>
    <div id="result">
        <table id="dataTable">
            <thead>
                <tr>
                    <th>商品标题</th>
                    <th>商品链接</th>
                    <th>数量</th>
                    <th>价格</th>
                </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>
    <script src="popup.js"></script>
</body>
</html>